import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

import { resolve } from "path";

import AutoImport from 'unplugin-auto-import/vite' //elementplus按需加载 插件
import Components from 'unplugin-vue-components/vite'//elementplus按需加载 插件
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'//elementplus按需加载 插件



// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    vue(),
    AutoImport({
      resolvers: [ElementPlusResolver()],
    }),
    Components({
      resolvers: [ElementPlusResolver()],
    }),
  ],
  resolve: {
    alias:{
      "/@":resolve(__dirname, ".", "src"),
      "@build":resolve(__dirname, ".", "build"),

    }
  },
})


